const path = require('path');
const Koa = require('koa');
const app = new Koa();
const bodyParser = require('koa-bodyparser');
const static = require('koa-static');
const init = require('./app/core/init.js');
const webError = require('./app/middlewares/error.js');
app.use(bodyParser());
app.use(webError);
app.use(static(path.join(__dirname, './static')));
init.entrance(app);

app.listen(3000, () => {
    console.log('启动成功');
})